package com.phiture.erp.basic.web.convert;

import com.phiture.erp.basic.api.pojo.resp.ErpMaterialInfoResp;
import com.phiture.erp.basic.api.pojo.resp.ErpMaterialResp;
import com.phiture.erp.basic.core.pojo.dto.ErpMaterialInfoDTO;
import com.phiture.erp.basic.dal.entity.ErpMaterialDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author YH
 * @date 2025/4/8
 */
@Mapper
public interface ErpMaterialConvertMapper {
    ErpMaterialConvertMapper INSTANCE = Mappers.getMapper(ErpMaterialConvertMapper.class);

    ErpMaterialResp toErpMaterialResp(ErpMaterialDO erpMaterialDO);
    List<ErpMaterialResp> toErpMaterialRespList(List<ErpMaterialDO> erpMaterialDOList);

//    @Mapping(target = "dayAhead", ignore = true)
    ErpMaterialInfoResp toErpMaterialInfoResp(ErpMaterialInfoDTO dto);
    List<ErpMaterialInfoResp> toErpMaterialInfoRespList(List<ErpMaterialInfoDTO> dtoList);

}
